﻿<Window x:Class="HouseKeepingPL.Login"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ff="clr-namespace:HouseKeepingPL"
        Title="Login" Height="165" Width="300" WindowStartupLocation="CenterScreen" Icon="/Resources/Key.ico"
           DataContext="{Binding Login,
                              Source={StaticResource Locator}}">
    <StackPanel>
        <Label Content="Please Login"></Label>
        <DockPanel Name="dockUserName" LastChildFill="True">
            <Label Content="UserName: " DockPanel.Dock="Left" Width="80px" ></Label>
            <Label Name="lblUsernameError" Content="" DockPanel.Dock="Right" Width="20px"></Label><!--spacer-->
            <TextBox Name="tbUserName" DockPanel.Dock="Right" Text="{Binding BindUsername}" ></TextBox>           
        </DockPanel>
        <DockPanel  Name="dockPassword" LastChildFill="True" >
            <Label Content="Password: " DockPanel.Dock="Left" Width="80px"></Label>
            <Label Name="lblPasswordError" Content="" DockPanel.Dock="Right" Width="20px"></Label> <!--spacer-->
            <TextBox Name="tbPassword" DockPanel.Dock="Right" Text="{Binding BindPassword}" ></TextBox>

            <!--<PasswordBox Name="tbPassword" DockPanel.Dock="Right" 
                           ff:PasswordHelper.Password="{Binding BindPassword, ElementName=plain}" ></PasswordBox>-->
        </DockPanel>
        <StackPanel  Name="dockOperations" HorizontalAlignment="Center"  Orientation="Horizontal">
            <Button Name="btnLogin" Content="Login" Margin="10" Command="{Binding AuthLogin}"></Button>
            <Button Name="btnCreate" Content="Create User" Margin="10" Command="{Binding CreateUserClick}"></Button>
            <Button Name="btnExit" Content="Exit" Margin="10" Command="{Binding ExitApplication}"></Button>
        </StackPanel>
        

    </StackPanel>
</Window>
